package com.songcan.common.contans;

public class CoreLoginSqlContants {

    private  static  final String Clomns = " password,user_id as userId,platform_id as platformId,mobile,realname,avatarurl,nickname,is_identify as isIdentify,is_open as isOpen,user_ip as userIp,status";
    public static final String findByMobileCount = "select count(1) from yfk_user where  mobile = ?";
    public static final String findBymobileObject = "select "+Clomns+" from yfk_user where  mobile = ?";

    /**微信登录sql**/
    public static final String WECHAT_SELECT_SQL=" select  count(1) from yfk_wx_user_info where union_id = ?";
    public static final String WECHAT_SELECT_BY_UNIONID_SQL= "select wx_user_info_id,user_id,union_id from yfk_wx_user_info where union_id = ?";
    public static final String WECHAT_INSERT_SQL = "INSERT INTO yfk_wx_user_info(wx_user_info_id,open_id,nickname,sex,province,city,country,avatar_url" +
            ",union_id,create_time,is_deleted)VALUES(?,?,?,?,?,?,?,?,?,NOW(),0)";

    /**一鍵登錄**/
    public static final String MOBILE_KEY_INSERT = "insert into yfk_user(user_id,mobile)values(?,?)";

}
